package edu.sctu.practice.class02.yangshengyu.two10;

/**
 * Created by Cullen on 2015/8/11.
 */
public class N22_1 {
    public static void main(String[] args) {
        System.out.println("三位数中的水仙花数有：");
        for (int r = 100; r < 1000; r++) {
            int o = r / 100;
            int p = r / 10 % 10;
            int q = r % 10;
            if (o * o * o + p * p * p + q * q * q == r) {
                System.out.println(+r);
            }
        }
    }
}

